<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>商户收银宝</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/app/admin/component/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/app/admin/component/pear/css/pear.css" media="all">
    <link rel="stylesheet" href="/app/ky_shouyin/static/css/admin.css" media="all">
</head>
<body class="layui-layout-body">
    <div id="LAY_app">
        <div class="layui-layout layui-layout-admin">
            <!-- 头部区域 -->
            <div class="layui-header">
                <ul class="layui-nav layui-layout-left">
                    <li class="layui-nav-item layadmin-flexible" lay-unselect>
                        <a href="javascript:;" layadmin-event="flexible" title="侧边伸缩">
                            <i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
                        </a>
                    </li>
                </ul>
                <ul class="layui-nav layui-layout-right">
                    <li class="layui-nav-item layui-hide-xs" lay-unselect>
                        <a href="javascript:;" layadmin-event="theme">
                            <i class="layui-icon layui-icon-theme"></i>
                        </a>
                    </li>
                    <li class="layui-nav-item" lay-unselect>
                        <a href="javascript:;">
                            <cite>管理员</cite>
                        </a>
                        <dl class="layui-nav-child">
                            <dd><a lay-href="{$base_path}/staff/profile">基本资料</a></dd>
                            <dd><a lay-href="{$base_path}/staff/password">修改密码</a></dd>
                            <hr>
                            <dd style="text-align: center;"><a href="{$base_path}/logout">退出</a></dd>
                        </dl>
                    </li>
                </ul>
            </div>

            <!-- 侧边菜单 -->
            <div class="layui-side layui-side-menu">
                <div class="layui-side-scroll">
                    <div class="layui-logo">
                        <span>商户收银宝</span>
                    </div>
                    <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
                        <li data-name="member" class="layui-nav-item">
                            <a href="javascript:;" lay-tips="会员管理" lay-direction="2">
                                <i class="layui-icon layui-icon-user"></i>
                                <cite>会员管理</cite>
                            </a>
                            <dl class="layui-nav-child">
                                <dd><a lay-href="/app/ky_shouyin/member/index">会员列表</a></dd>
                                <dd><a lay-href="/app/ky_shouyin/member/card">会员卡管理</a></dd>
                                <dd><a lay-href="/app/ky_shouyin/member/level/index">会员等级</a></dd>
                                <dd><a lay-href="/app/ky_shouyin/points/rule/index">积分规则</a></dd>
                            </dl>
                        </li>
                        <li data-name="goods" class="layui-nav-item">
                            <a lay-href="/app/ky_shouyin/goods/index" lay-tips="商品管理" lay-direction="2">
                                <i class="layui-icon layui-icon-cart"></i>
                                <cite>商品管理</cite>
                            </a>
                        </li>
                        <li data-name="order" class="layui-nav-item">
                            <a lay-href="/app/ky_shouyin/order/index" lay-tips="订单管理" lay-direction="2">
                                <i class="layui-icon layui-icon-form"></i>
                                <cite>订单管理</cite>
                            </a>
                        </li>
                        <li data-name="store" class="layui-nav-item">
                            <a lay-href="/app/ky_shouyin/store/index" lay-tips="门店管理" lay-direction="2">
                                <i class="layui-icon layui-icon-home"></i>
                                <cite>门店管理</cite>
                            </a>
                        </li>
                        <li data-name="staff" class="layui-nav-item">
                            <a lay-href="/app/ky_shouyin/staff/index" lay-tips="员工管理" lay-direction="2">
                                <i class="layui-icon layui-icon-friends"></i>
                                <cite>员工管理</cite>
                            </a>
                        </li>
                        <li data-name="statistics" class="layui-nav-item">
                            <a lay-href="/app/ky_shouyin/statistics/index" lay-tips="统计分析" lay-direction="2">
                                <i class="layui-icon layui-icon-chart"></i>
                                <cite>统计分析</cite>
                            </a>
                        </li>
                    </ul>
                </div>
            </div>

            <!-- 主体内容 -->
            <div class="layui-body" id="LAY_app_body">
                <div class="layadmin-tabsbody-item layui-show">
                    <iframe src="/app/ky_shouyin/welcome" frameborder="0" class="layadmin-iframe" id="LAY_app_main"></iframe>
                </div>
            </div>
        </div>
    </div>

    <script src="/app/admin/component/layui/layui.js"></script>
    <script src="/app/admin/component/pear/pear.js"></script>
    <script>
    layui.config({
        base: '/app/ky_shouyin/static/js/' //静态资源所在路径
    }).extend({
        index: 'lib/index'
    }).use(['index', 'element'], function(){
        var index = layui.index
        ,element = layui.element
        ,$ = layui.$;
        
        // 初始化
        index.init();
        
        // 渲染导航
        element.render('nav');
        
        //监听侧边菜单点击
        element.on('nav(layadmin-system-side-menu)', function(elem){
            var layHref = elem.attr('lay-href');
            if(layHref){
                // 修改这里，直接设置iframe的src
                $('#LAY_app_main').attr('src', layHref);
                
                // 移除其他选中状态
                $('.layui-nav-item').removeClass('layui-this');
                // 添加当前选中状态
                elem.parent().addClass('layui-this');
            }
        });
    });
    </script>
</body>
</html>

